﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VCC.Site.ViewModels.TabGetJobModel>" %>
<%@ Import Namespace="VCC.Lib.Common"%>
<%@ Import Namespace="VCC.Model"%>
<%@ Import Namespace="VCC.Lib.Helpers" %>

<div class="product-list tin-danh-cho-ban">
<%if (Model.Ads != null && Model.Ads.Count() > 0)
  {%>
    <% foreach (Ad item in Model.Ads)
       {
           if (item.VIPTypeID == 1)
           {%>
            <div class="vip0">
                <div class="p-main">
                    <div class="p-main-image-crop">
                        <a class="product-avatar" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>">
                            <img class="product-avatar-img" src="<%=LinkUtils.UrlImageOrDefault(item.AvataImage)%>" alt="<%=item.Title%>" title="<%=item.Title %>">
                        </a>
                    </div>
                    <div class="p-content">
                        <div class="p-title">
                            <h3>
                                <a title="<%=item.Title %>" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>"><%= Html.Encode(item.Title.Length > 50 ? TextHelper.CutString(item.Title, 50) + ".." : item.Title)%></a><%=Utils.CheckNewAdToDay(item.StartDate.Value)%>
                            </h3>
                        </div>
                        <div class="p-summary">
                            <%=item.Content.Length > 170 ? TextHelper.CutAndRemoveHtml(item.Content,170) + ".." : TextHelper.RemoveHTML(item.Content)%>
                        </div>
                    </div>
                    <div class="p-bottom-crop">
                        <div class="p-bottom-left">
                            <div>
                                <div class="fleft"><strong><%= Utils.DateTimeToStringFormat(item.StartDate.Value)%></strong>...</div>
                                <%--<div class="fleft"><%= item.ViewNumber!= null && item.ViewNumber > 0 ? "Viewed: <strong>" + item.ViewNumber + "</strong>" : ""%></div>--%>
                                <div class="p-bottom-right font09">Tại: <strong><%=Html.Encode(item.Suburb.FullName)%></strong></div>
                                <div class="clear"></div>
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
            <%}
           else if (item.VIPTypeID == 2)
           {%>
           <div class="vip1">
                <div class="p-main">
                    <div class="p-main-image-crop">
                        <a class="product-avatar" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>">
                            <img class="product-avatar-img" src="<%=LinkUtils.UrlImageOrDefault(item.AvataImage)%>" alt="<%=item.Title%>" title="<%=item.Title %>">
                        </a>
                    </div>
                    <div class="p-content">
                        <div class="p-title">
                            <h3>
                                <a title="<%=item.Title %>" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>"><%= Html.Encode(item.Title.Length > 50 ? TextHelper.CutString(item.Title, 50) + ".." : item.Title)%></a><%=Utils.CheckNewAdToDay(item.StartDate.Value)%>
                            </h3>
                        </div>
                        <div class="p-summary">
                            <%=item.Content.Length > 170 ? TextHelper.CutAndRemoveHtml(item.Content,170) + ".." : TextHelper.RemoveHTML(item.Content)%>
                        </div>
                    </div>
                    <div class="p-bottom-crop">
                        <div class="p-bottom-left">
                            <div>
                                <div class="fleft"><strong><%= Utils.DateTimeToStringFormat(item.StartDate.Value)%></strong>...</div>
                                <%--<div class="fleft"><%= item.ViewNumber!= null && item.ViewNumber > 0 ? "Viewed: <strong>" + item.ViewNumber + "</strong>" : ""%></div>--%>
                                <div class="p-bottom-right font09">Tại: <strong><%=Html.Encode(item.Suburb.FullName)%></strong></div>
                                <div class="clear"></div>
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
            <%}
           else if (item.VIPTypeID == 3)
           {%>
           <div class="vip2">
                <div class="p-main">
                    <div class="p-main-image-crop">
                        <a class="product-avatar" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>">
                            <img class="product-avatar-img" src="<%=LinkUtils.UrlImageOrDefault(item.AvataImage)%>" alt="<%=item.Title%>" title="<%=item.Title %>">
                        </a>
                    </div>
                    <div class="p-content">
                        <div class="p-title">
                            <h3>
                                <a title="<%=item.Title %>" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>"><%= Html.Encode(item.Title.Length > 50 ? TextHelper.CutString(item.Title, 50) + ".." : item.Title)%></a><%=Utils.CheckNewAdToDay(item.StartDate.Value)%>
                            </h3>
                        </div>
                        <div class="p-summary">
                            <%=item.Content.Length > 170 ? TextHelper.CutAndRemoveHtml(item.Content,170) + ".." : TextHelper.RemoveHTML(item.Content)%>
                        </div>
                    </div>
                    <div class="p-bottom-crop">
                        <div class="p-bottom-left">
                            <div>
                                <div class="fleft"><strong><%= Utils.DateTimeToStringFormat(item.StartDate.Value)%></strong>...</div>
                                <%--<div class="fleft"><%= item.ViewNumber!= null && item.ViewNumber > 0 ? "Viewed: <strong>" + item.ViewNumber + "</strong>" : ""%></div>--%>
                                <div class="p-bottom-right font09">Tại: <strong><%=Html.Encode(item.Suburb.FullName)%></strong></div>
                                <div class="clear"></div>
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
            <%}
           else if (item.VIPTypeID == 4)
           {%>
           <div class="vip3">
                <div class="p-main">
                    <div class="p-main-image-crop">
                        <a class="product-avatar" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>">
                            <img class="product-avatar-img" src="<%=LinkUtils.UrlImageOrDefault(item.AvataImage)%>" alt="<%=item.Title%>" title="<%=item.Title %>">
                        </a>
                    </div>
                    <div class="p-content">
                        <div class="p-title">
                            <h3>
                                <a title="<%=item.Title %>" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>"><%= Html.Encode(item.Title.Length > 50 ? TextHelper.CutString(item.Title, 50) + ".." : item.Title)%></a><%=Utils.CheckNewAdToDay(item.StartDate.Value)%>
                            </h3>
                        </div>
                        <div class="p-summary">
                            <%=item.Content.Length > 170 ? TextHelper.CutAndRemoveHtml(item.Content,170) + ".." : TextHelper.RemoveHTML(item.Content)%>
                        </div>
                    </div>
                    <div class="p-bottom-crop">
                        <div class="p-bottom-left">
                            <div>
                                <div class="fleft"><strong><%= Utils.DateTimeToStringFormat(item.StartDate.Value)%></strong>...</div>
                                <%--<div class="fleft"><%= item.ViewNumber!= null && item.ViewNumber > 0 ? "Viewed: <strong>" + item.ViewNumber + "</strong>" : ""%></div>--%>
                                <div class="p-bottom-right font09">Tại: <strong><%=Html.Encode(item.Suburb.FullName)%></strong></div>
                                <div class="clear"></div>
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
            <%}
           else if (item.VIPTypeID == 5)
           {%>
            <div class="vip5">
                <div class="p-main">
                    <div class="p-main-image-crop">
                        <a class="product-avatar" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>">
                            <img class="product-avatar-img" src="<%=LinkUtils.UrlImageOrDefault(item.AvataImage)%>" alt="<%=item.Title%>" title="<%=item.Title %>">
                        </a>
                    </div>
                    <div class="p-content">
                        <div class="p-title">
                            <h3>
                                <a title="<%=item.Title %>" href="<%= LinkUtils.UrlAdDetails(item.Title,item.ID)%>"><%= Html.Encode(item.Title.Length > 60 ? TextHelper.CutString(item.Title, 60) + ".." : TextHelper.ToUpperFistletter(item.Title))%></a><%=Utils.CheckNewAdToDay(item.StartDate.Value)%>
                            </h3>
                        </div>
                        <div class="p-summary">
                            <%=item.Content.Length > 170 ? TextHelper.CutAndRemoveHtml(item.Content,170) + ".." : TextHelper.RemoveHTML(item.Content)%>
                        </div>
                    </div>
                    <div class="p-bottom-crop">
                        <div class="p-bottom-left">
                            <div>
                                <div class="fleft"><strong><%= Utils.DateTimeToStringFormat(item.StartDate.Value)%></strong>...</div>
                                <%--<div class="fleft"><%= item.ViewNumber!= null && item.ViewNumber > 0 ? "Viewed: <strong>" + item.ViewNumber + "</strong>" : ""%></div>--%>
                                <div class="p-bottom-right font09">Tại: <strong><%=Html.Encode(item.Suburb.FullName)%></strong></div>
                                <div class="clear"></div>
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
        <%}
       }
  }
  else
  {%>
    <div style="text-align:center; padding:20px 0px 20px 0px;">
        Tin rao đang được cập nhật!
    </div>
  <%} %>

<div class="otherlink">
    <a href="<%=Model.Category.ShortName%>" class="link_sr" style="text-decoration: none">
        &gt; Xem thêm các tin việc làm khác</a></div>
 
</div>
